<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});

Route::group(['namespace' => 'Home'], function () {

    //  不需要登录的页面
    Route::get( '/', 'IndexController@index');

    Route::group(['middleware' => ['auth']], function () {
        //  需要登录的页面
        Route::get( '/hello', 'IndexController@hello');
        Route::post( '/web/query', 'IndexController@query');
    });
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
